//文件信息相关

console.log(process.pid);
const myURL=new URL("/foot","https://example.com");
myURL.searchParams.append("key","value");
console.log(myURL.href);

let params=new URLSearchParams(myURL.searchParams);
params.append("key1","value1");
console.log(params);
//buffer对象
const buf=Buffer.from("r中国","utf-8");
const strBase64=buf.toString("base64");
console.log(strBase64);

//定时器
let timer=setInterval(() => {
    console.log(`${new Date().toLocaleString()}`);
}, 1000);
//事件处理
process.on("SIGINT",()=>{
    console.log("系统退出");
    clearInterval(timer);
});